import request from "@/request/index.js"

export default {

	/**
	 * 登录
	 * @param {Object} params
	 */
	login(params) {
		return request("/user/login", params)
	},
	/**
	 * 微信登录
	 * @param {Object} params
	 */
	wxLogin(params) {
		return request("/user/wxLogin", params)
	},
	/**
	 * 退出登录
	 * @param {Object} params
	 */
	logout(params) {
		return request("/user/logout", params, {
			method: "GET",
			loading: true
		})
	},
	/**
	 * 获取角色列表
	 * @param {Object} params
	 */
	getRoleList(params) {
		return request("/sysRole/list", params, {
			method: "GET",
			loading: true
		})
	},
	/**
	 * 业务员新增客户信息
	 * @param {Object} params
	 */
	insertClients(params) {
		return request("/clients/insertClients", params)
	},
	/**
	 * 业务员新增客户信息
	 * @param {Object} params
	 */
	selectAllClients(params) {
		return request("/clients/selectAllClients", params, null, {
			page: 1,
			size: 20,
			address: '',
			type: '',
		})
	},
	/**
	 * 获取路由菜单
	 * @param {Object} params
	 */
	getMenuRoute(params) {
		return request("/sysMenu/menuRoute", params, {
			method: "GET",
			loading: true
		})
	},
	/**
	 * 获取消息通知
	 * @param {Object} params
	 */
	getMsgNotificationList(params) {
		return request("/masterControl/getMsgNotificationList", params)
	},
	/**
	 * 修改消息状态
	 * @param {Object} params
	 */
	updateMsgNotification(params) {
		return request("/masterControl/updateMsgNotification", params)
	},
	/**
	 * 删除消息
	 * @param {Object} params
	 */
	deleteMsgNotification(params) {
		return request("/masterControl/deleteMsgNotification", params)
	},
}